//-----------------------------------------------------------------------------
//  Copyright (C) 2005-2008 Thomas S. Ullrich 
//
//  This file is part of the Solitaire Mahjong project.
//
//  This file may be used under the terms of the GNU General Public License.
//  This project is free software; you can redistribute it and/or modify it
//  under the terms of the GNU General Public License.
//  
//  Author: Thomas S. Ullrich
//  Last update: October 28, 2007
//-----------------------------------------------------------------------------
#ifndef smSettings_h
#define smSettings_h
#include <QColor>
#include <QSize>
#include <QPoint>
 
//class smHighscoreListImp;
class QSettings;
class smHighscoreList;
 
class smSettings
{
public:
    static smSettings* instance();
    void load();
    void save();
    void setDefault();
	void setHighscoreList(smHighscoreList*);
     
public:
    // Actual values
    int     mCurrentTileSize;
    QColor  mBackgroundColor;
    bool    mShowTileNamesInStatusBar;
    bool    mBeepWhenTileNotFree;
    bool    mRandomHint;
    bool    mShowNumberOfPossibleMoves;
    QString mLastVisitedDirectory;
    QPoint  mMainWindowPosition;
    QPoint  mPreferencesWindowPosition;
    QPoint  mHighscoreWindowPosition;
    QPoint  mPlayedTilesWindowPosition;
    QPoint  mHelpBrowserPosition;
    QSize   mPlayedTilesWindowSize;
    
    // Defaults
    static const int     mDefaultTileSize;
    static const QColor  mDefaultBackgroundColor;
    static const bool    mDefaultShowTileNamesInStatusBar;
    static const bool    mDefaultBeepWhenTileNotFree;
    static const bool    mDefaultRandomHint;
    static const bool    mDefaultShowNumberOfPossibleMoves;
    static const QString mDefaultLastVisitedDirectory;
    static const QPoint  mDefaultMainWindowPosition;
    static const QPoint  mDefaultPreferencesWindowPosition;
    static const QPoint  mDefaultHighscoreWindowPosition;
    static const QPoint  mDefaultPlayedTilesWindowPosition;
    static const QPoint  mDefaultHelpBrowserPosition;
    static const QSize   mDefaultPlayedTilesWindowSize;
     
private:
    smSettings();
    QSettings          *mSettings;
    smHighscoreList    *mHighscoreList;
    static smSettings  *mInstance;
};
 
#endif
